package com.shijun.im.glide;

/**
 * Created by Administrator on 2017/9/13 0013.
 */

public class JPGDataModel implements IDataModel {
    private String dataModelUrl;

    public JPGDataModel(String dataModelUrl) {
        this.dataModelUrl = dataModelUrl;
    }

    @Override
    public String buildDataModelUrl(int width, int height) {
        //http://78re52.com1.z0.glb.clouddn.com/resource/gogopher.jpg?imageView2/1/w/200/h/200/format/jpg
        //http://shijun.image.alimmdn.com/pic6.JPG@300w_300h
        return String.format("%s@%dw_%dh", dataModelUrl, width, height);
    }
}